package inits

import (
	"fmt"
	"zg4zk3/api-way/basic/pkg"
)

func Consul() {

	client, err := pkg.NewClient("localhsot:8080")
	if err != nil {
		return
	}

	service, err := client.RegisterService(pkg.ServiceRegistration{
		Name:    "服务注册",
		Address: "14.103.243.149",
		Port:    8500,
		Tags:    nil,
		ID:      "1",
	})
	if err != nil {
		return
	}
	if err != nil {
		fmt.Errorf("%v", service)
	}

}
